package com.ruoyi.profession.controller;

import com.ruoyi.profession.domain.Result;
import com.ruoyi.profession.domain.Statistics;
import com.ruoyi.profession.service.StatisticsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/profession/statistics")
public class StatisticsController {
    @Autowired
    private StatisticsService statisticsService;
    @GetMapping
    public Result list(){
        log.info("查询");
        Statistics statistics = statisticsService.fetchStatistics();
         return Result.success(statistics);
    }
}
